﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

/// <summary>
/// Business Object for Reminder
/// </summary>
public class Reminder
{
    private String id;
    private String title;
    private String desc;
    private String alarmTime;
    private String username;

    private ReminderDA reminderDA;

    public Reminder()
	{
        reminderDA = new ReminderDA();
	}

    public String ID
    {
        get
        {
            return this.id;
        }
        set
        {
            this.id = value;
        }
    }

    public String Title
    {
        get
        {
            return this.title;
        }
        set
        {
            this.title = value;
        }
    }

    public String Description
    {
        get
        {
            return this.desc;
        }
        set
        {
            this.desc = value;
        }
    }

    public String AlarmTime
    {
        get
        {
            return this.alarmTime;
        }
        set
        {
            this.alarmTime = value;
        }
    }

    public String Username
    {
        get
        {
            return this.username;
        }
        set
        {
            this.username = value;
        }
    }

    public int Delete()
    {
        int result = reminderDA.Delete(this);
        return result;
    }

    public int Insert()
    {
        int result = reminderDA.Insert(this);
        return result;
    }

    public int Update()
    {
        int result = reminderDA.Update(this);
        return result;
    }

    public int Stop()
    {
        int result = reminderDA.Stop(this);
        return result;
    }

    public int Postpone()
    {
        int result = reminderDA.Postpone(this);
        return result;
    }

    public DataTable SelectAllByUsername()
    {
        DataTable dt = reminderDA.SelectAllByUsername(this);
        return dt;
    }
}
